-- GENERATED SPELL FOR [Cyber-Rage Forgelord] --


function spell0_16943(pUnit, Event) --@Chaos Nova,Self--
pUnit:FullCastSpellOnTarget(36255,pUnit)
pUnit:RegisterEvent('Sorts_16943', 14000, 1)
end

function spell1_16943(pUnit, Event) --@Detonate Teleporter,n/a--
pUnit:FullCastSpellOnTarget(38920,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16943', 15000, 1)
end

function spell2_16943(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_16943', 618, 1)
end

function Sorts_16943(pUnit, Event)
local choix_sorts_16943 = math.random(0, 2)
if choix_sorts_16943 == 0 then
pUnit:RegisterEvent('spell0_16943', 1, 1)
end
if choix_sorts_16943 == 1 then
pUnit:RegisterEvent('spell1_16943', 1, 1)
end
if choix_sorts_16943 == 2 then
pUnit:RegisterEvent('spell2_16943', 1, 1)
end
end

function mob16943_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16943', math.random(1500, 3000), 1)
end

function mob16943_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16943_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16943_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16943, 1, 'mob16943_Action')
RegisterUnitEvent(16943, 2, 'mob16943_Leave')
RegisterUnitEvent(16943, 3, 'mob16943_Kill')
RegisterUnitEvent(16943, 4, 'mob16943_Die')
